// SummaryProperties.h

#pragma once

#include "CustomProperty.h"

using namespace System;
using namespace System::Collections::Generic;
using namespace msclr::com;

namespace DsoFileNET {

	public ref class SummaryProperties
	{
	private:
		//
		// Member variables
		//
		Dictionary<DsoFileNET::SummaryInformationProperty, CustomProperty<DsoFileNET::SummaryInformationProperty>^>^ summProps;
		Dictionary<DsoFileNET::UserDefinedProperty, CustomProperty<DsoFileNET::UserDefinedProperty>^>^ docProps;

		short codePageSI;
		short codePageUD;

		ptr<IPropertySetStorage> storage;

	internal:
		SummaryProperties(ptr<IPropertySetStorage> %propStorage, bool readOnly, DsoFileNET::FileOpenOptions options);

	public:
		//
		// Methods
		//
		~SummaryProperties();

		//
		// Properties
		//
		property String^ Title { String^ get(); void set(String^ value); }
		property String^ Subject { String^ get(); void set(String^ value); }
		property String^ Author { String^ get(); void set(String^ value); }
		property String^ Keywords { String^ get(); void set(String^ value); }
		property String^ Comments { String^ get(); void set(String^ value); }
		property String^ Template { String^ get(); }
		property String^ LastSavedBy { String^ get(); void set(String^ value); }
		property String^ RevisionNumber { String^ get(); }
		property int TotalEditTime { int get(); }
		property System::DateTime DateLastPrinted { System::DateTime get(); }
		property System::DateTime DateCreated { System::DateTime get(); }
		property System::DateTime DateLastSaved { System::DateTime get(); }
		property int PageCount { int get(); }
		property int WordCount { int get(); }
		property int CharacterCount { int get(); }
		property Object^ Thumbnail { Object^ get(); }
		property String^ ApplicationName { String^ get(); }
		property int DocumentSecurity { int get(); }

		property String^ Category { String^ get(); void set(String^ value); }
		property String^ PresentationFormat { String^ get(); }
		property int ByteCount { int get(); }
		property int LineCount { int get(); }
		property int ParagraphCount { int get(); }
		property int SlideCount { int get(); }
		property int NoteCount { int get(); }
		property int HiddenSlideCount { int get(); }
		property int MultimediaClipCount { int get(); }
		property String^ Manager { String^ get(); void set(String^ value); }
		property String^ Company { String^ get(); void set(String^ value); }
		property int CharacterCountWithSpaces { int get(); }
		property bool SharedDocument { bool get(); }
		property String^ Version { String^ get(); }
		property Object^ DigitalSignature { Object^ get(); }

	private:
		generic <typename Tprop, typename Tout>
		static bool ReadProperty(Dictionary<Tprop, CustomProperty<Tprop>^>^ props, Tprop propId, Tout %result);
	};
}
